<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>PintarOS: include/response.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PintarOS
   </div>
   <div id="projectbrief">Operating System for Smart Card</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">response.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Header file for response manager.  
<a href="#details">More...</a></p>

<p><a href="response_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a0b9384277369e8c36725467bb40194d8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="response_8h.html#a0b9384277369e8c36725467bb40194d8">rspn_type</a> { <br/>
&#160;&#160;<b>Response_OK</b>, 
<b>Response_Normal</b>, 
<b>Response_Warning_Unchanged</b>, 
<b>Response_Warning_DataCorrupt</b>, 
<br/>
&#160;&#160;<b>Response_Warning_EndOfFile</b>, 
<b>Response_Warning_FileDeactivated</b>, 
<b>Response_Warning_Changed</b>, 
<b>Response_Warning_FilledUp</b>, 
<br/>
&#160;&#160;<b>Response_Warning_Counter</b>, 
<b>Response_Error_Unchanged</b>, 
<b>Response_Error_Changed</b>, 
<b>Response_WrongLength</b>, 
<br/>
&#160;&#160;<b>Response_NotSupported</b>, 
<b>Response_NotSupported_LogicalChannel</b>, 
<b>Response_NotSupported_SecureMessaging</b>, 
<b>Response_NotSupported_LastCommandExpected</b>, 
<br/>
&#160;&#160;<b>Response_NotSupported_CommandChain</b>, 
<b>Response_CmdNotAllowed</b>, 
<b>Response_CmdNotAllowed_Incompatible_FS</b>, 
<b>Response_CmdNotAllowed_SecurityStatus</b>, 
<br/>
&#160;&#160;<b>Response_CmdNotAllowed_AuthBlocked</b>, 
<b>Response_CmdNotAllowed_RefDataNotUsable</b>, 
<b>Response_CmdNotAllowed_ConditionNotSatisfied</b>, 
<b>Response_CmdNotAllowed_NoCurrentEF</b>, 
<br/>
&#160;&#160;<b>Response_CmdNotAllowed_ExpectSecureMsg</b>, 
<b>Response_CmdNotAllowed_IncorrectSecureMsg</b>, 
<b>Response_WrongP1P2</b>, 
<b>Response_WrongP1P2_IncorrectData</b>, 
<br/>
&#160;&#160;<b>Response_WrongP1P2_FuncNotSupported</b>, 
<b>Response_WrongP1P2_FileNotFound</b>, 
<b>Response_WrongP1P2_RecordNotFound</b>, 
<b>Response_WrongP1P2_NotEnoughMem</b>, 
<br/>
&#160;&#160;<b>Response_WrongP1P2_NCInconsistentTLV</b>, 
<b>Response_WrongP1P2_IncorrectP1P2</b>, 
<b>Response_WrongP1P2_NCInconsistentP1P2</b>, 
<b>Response_WrongP1P2_RefDataNotFound</b>, 
<br/>
&#160;&#160;<b>Response_WrongP1P2_FileExist</b>, 
<b>Response_WrongP1P2_DFNameExist</b>, 
<b>Response_INSNotSupported</b>, 
<b>Response_CLANotSupported</b>, 
<br/>
&#160;&#160;<b>Response_FatalError</b>
<br/>
 }</td></tr>
<tr class="memdesc:a0b9384277369e8c36725467bb40194d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">response type enumeration <br/></td></tr>
<tr class="separator:a0b9384277369e8c36725467bb40194d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa8b19051485ea36c5e0d71ac83b5bff3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="response_8h.html#aa8b19051485ea36c5e0d71ac83b5bff3">Response_SetSW</a> (uint8_t response, uint8_t xtra)</td></tr>
<tr class="memdesc:aa8b19051485ea36c5e0d71ac83b5bff3"><td class="mdescLeft">&#160;</td><td class="mdescRight">set up an appropriate response APDU  <a href="#aa8b19051485ea36c5e0d71ac83b5bff3">More...</a><br/></td></tr>
<tr class="separator:aa8b19051485ea36c5e0d71ac83b5bff3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Header file for response manager. </p>
<dl class="section author"><dt>Author</dt><dd>Ricky Hariady (<a href="#" onclick="location.href='mai'+'lto:'+'ric'+'ky'+'.ha'+'ri'+'ady'+'@e'+'nte'+'r.'+'web'+'.i'+'d'; return false;">ricky<span style="display: none;">.nosp@m.</span>.har<span style="display: none;">.nosp@m.</span>iady@<span style="display: none;">.nosp@m.</span>ente<span style="display: none;">.nosp@m.</span>r.web<span style="display: none;">.nosp@m.</span>.id</a>)</dd></dl>
<dl class="section date"><dt>Date</dt><dd>7/10/2013 </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aa8b19051485ea36c5e0d71ac83b5bff3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Response_SetSW </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>response</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>xtra</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set up an appropriate response APDU </p>
<p>Call by CommandInterpreter() when finish execute the command. Interpret response type from command handler to Return Code (SW1 SW2), then transmit response APDU (Return Code plus Return data) over transTx()</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*apdu_res</td><td>pointer to apdu resources </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jun 4 2014 18:13:31 for PintarOS by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
